package com.sasis.model;
// Generated 2007-5-22 14:23:20 by Hibernate Tools 3.1.0.beta4

import java.math.BigDecimal;
import java.sql.Date;
import java.sql.Timestamp;


/**
 * @struts.form include-all="true" extends="BaseForm"
 * @hibernate.class
 *         table="FLIGHT_ADJUST_FOOD"
 *     
 */

public class FlightAdjustFood extends com.sasis.model.BaseObject implements java.io.Serializable {


    // Fields    

    private Integer id;
    private Integer flightInfoId;
    private Integer foodTypeId;
    private BigDecimal price;
    private Integer amount;
    private Integer operator;
    private Timestamp operatDate;
    private String foodName;
    private float total;


    // Constructors

    public String getFoodName() {
		return foodName;
	}

	public void setFoodName(String foodName) {
		this.foodName = foodName;
	}

	public float getTotal() {
		return total;
	}

	public void setTotal(float total) {
		this.total = total;
	}

	/** default constructor */
    public FlightAdjustFood() {
    }

	/** minimal constructor */
    public FlightAdjustFood(Integer flightInfoId) {
        this.flightInfoId = flightInfoId;
    }
    
    /** full constructor */
    public FlightAdjustFood(Integer flightInfoId, Integer foodTypeId, BigDecimal price, Integer amount, Integer operator, Timestamp operatDate) {
        this.flightInfoId = flightInfoId;
        this.foodTypeId = foodTypeId;
        this.price = price;
        this.amount = amount;
        this.operator = operator;
        this.operatDate = operatDate;
    }
    

   
    // Property accessors
    /**       
     *      *            @hibernate.id
     *             generator-class="native"
     *             type="java.lang.Integer"
     *             column="ID"
     *         
     */

    public Integer getId() {
        return this.id;
    }
    
    public void setId(Integer id) {
        this.id = id;
    }
    /**       
     *      *            @hibernate.property
     *             column="FLIGHT_INFO_ID"
     *             length="22"
     *             not-null="true"
     *         
     */

    public Integer getFlightInfoId() {
        return this.flightInfoId;
    }
    
    public void setFlightInfoId(Integer flightInfoId) {
        this.flightInfoId = flightInfoId;
    }
    /**       
     *      *            @hibernate.property
     *             column="FOOD_TYPE_ID"
     *             length="22"
     *         
     */

    public Integer getFoodTypeId() {
        return this.foodTypeId;
    }
    
    public void setFoodTypeId(Integer foodTypeId) {
        this.foodTypeId = foodTypeId;
    }
    /**       
     *      *            @hibernate.property
     *             column="PRICE"
     *             length="18"
     *         
     */

    public BigDecimal getPrice() {
        return this.price;
    }
    
    public void setPrice(BigDecimal price) {
        this.price = price;
    }
    /**       
     *      *            @hibernate.property
     *             column="AMOUNT"
     *             length="22"
     *         
     */

    public Integer getAmount() {
        return this.amount;
    }
    
    public void setAmount(Integer amount) {
        this.amount = amount;
    }
    /**       
     *      *            @hibernate.property
     *             column="OPERATOR"
     *             length="22"
     *         
     */

    public Integer getOperator() {
        return this.operator;
    }
    
    public void setOperator(Integer operator) {
        this.operator = operator;
    }
    /**       
     *      *            @hibernate.property
     *             column="OPERAT_DATE"
     *             length="7"
     *         
     */

    public Timestamp getOperatDate() {
        return this.operatDate;
    }
    
    public void setOperatDate(Timestamp operatDate) {
        this.operatDate = operatDate;
    }
   

    /**
     * toString
     * @return String
     */
     public String toString() {
	  StringBuffer buffer = new StringBuffer();

      buffer.append(getClass().getName()).append("@").append(Integer.toHexString(hashCode())).append(" [");
      buffer.append("flightInfoId").append("='").append(getFlightInfoId()).append("' ");			
      buffer.append("foodTypeId").append("='").append(getFoodTypeId()).append("' ");			
      buffer.append("price").append("='").append(getPrice()).append("' ");			
      buffer.append("amount").append("='").append(getAmount()).append("' ");			
      buffer.append("operator").append("='").append(getOperator()).append("' ");			
      buffer.append("operatDate").append("='").append(getOperatDate()).append("' ");			
      buffer.append("]");
      
      return buffer.toString();
     }


   public boolean equals(Object other) {
         if ( (this == other ) ) return true;
		 if ( (other == null ) ) return false;
		 if ( !(other instanceof FlightAdjustFood) ) return false;
		 FlightAdjustFood castOther = ( FlightAdjustFood ) other; 
         
		 return ( (this.getId()==castOther.getId()) || ( this.getId()!=null && castOther.getId()!=null && this.getId().equals(castOther.getId()) ) )
 && ( (this.getFlightInfoId()==castOther.getFlightInfoId()) || ( this.getFlightInfoId()!=null && castOther.getFlightInfoId()!=null && this.getFlightInfoId().equals(castOther.getFlightInfoId()) ) )
 && ( (this.getFoodTypeId()==castOther.getFoodTypeId()) || ( this.getFoodTypeId()!=null && castOther.getFoodTypeId()!=null && this.getFoodTypeId().equals(castOther.getFoodTypeId()) ) )
 && ( (this.getPrice()==castOther.getPrice()) || ( this.getPrice()!=null && castOther.getPrice()!=null && this.getPrice().equals(castOther.getPrice()) ) )
 && ( (this.getAmount()==castOther.getAmount()) || ( this.getAmount()!=null && castOther.getAmount()!=null && this.getAmount().equals(castOther.getAmount()) ) )
 && ( (this.getOperator()==castOther.getOperator()) || ( this.getOperator()!=null && castOther.getOperator()!=null && this.getOperator().equals(castOther.getOperator()) ) )
 && ( (this.getOperatDate()==castOther.getOperatDate()) || ( this.getOperatDate()!=null && castOther.getOperatDate()!=null && this.getOperatDate().equals(castOther.getOperatDate()) ) );
   }
   
   public int hashCode() {
         int result = 17;
         
         result = 37 * result + ( getId() == null ? 0 : this.getId().hashCode() );
         result = 37 * result + ( getFlightInfoId() == null ? 0 : this.getFlightInfoId().hashCode() );
         result = 37 * result + ( getFoodTypeId() == null ? 0 : this.getFoodTypeId().hashCode() );
         result = 37 * result + ( getPrice() == null ? 0 : this.getPrice().hashCode() );
         result = 37 * result + ( getAmount() == null ? 0 : this.getAmount().hashCode() );
         result = 37 * result + ( getOperator() == null ? 0 : this.getOperator().hashCode() );
         result = 37 * result + ( getOperatDate() == null ? 0 : this.getOperatDate().hashCode() );
         return result;
   }   





}
